package za.org.jcicada.genss.lifecycle;

import za.org.jcicada.genss.SystemURN;
import za.org.jcicada.genss.messages.Result;

/**
 * ILifeCycleObserver.java
 *
 * @author Simon Cross
 *
 * Created on November 19, 2008, 14:31
 */


/**
 * Observer for an ILifeCycleSubject.
 */
public interface ILifeCycleClient {

    // responses (requests in ILifeCycleSubject).

    /**
     * Halt the software subsystem.
     */
    void replyHalt(Result result, SystemURN systemURN);

    /**
     * Restart the software subsystem.
     */
    void replyRestart(Result result, SystemURN systemURN);

    /**
     * Set the subsystem logging level.
     */
    void replySetLogLevel(Result result, SystemURN systemURN, LogLevel level);
    
    /**
     * Reply to request to reconnect subsystem
     * @param result details of the success of the request
     * @param systemURN the subsystem to be reconnected
     */
    void replyReconnect(Result result, SystemURN systemURN);
    
    /**
     * Reply to the ping request
     * @param result details of the success of the request
     * @param systemURN the subsystem pinged
     */
	void replyPing(Result result, SystemURN systemURN);
    
    /**
     * Inform the client that it has been disconnected from the server.
     */
    void informDisconnect();

}
